home *** CD-ROM | disk | FTP | other *** search
- /* dayOfWeek.c
- 4th February 93
-
- by
- Jerome Chan
-
- This is an XFCN that will return the local dayOfWeek string.
- Thanks to Jon Pugh for _some_ form of code.
- All system calls are found in Inside Mac Vol 1 so I assume it works on all
- systems.
- */
-
- #include <HyperXCmd.h>
- #include <SetupA4.h>
- #include <OSUtils.h>
- #include <Packages.h>
-
- DateTimeRec today ;
- Intl1Hndl database ;
-
- pascal main(XCmdPtr paramPtr) {
-
- RememberA0();
- SetUpA4();
-
- GetTime(&today) ;
-
- database = (Intl1Hndl) IUGetIntl(1) ;
-
- paramPtr->returnValue=PasToZero( paramPtr, (**database).days[today.dayOfWeek-1] ) ;
-
- RestoreA4();
-
- }